package com.firewolf.oa.dao.impl;

import java.util.List;

import org.springframework.stereotype.Repository;

import com.firewolf.oa.base.impl.BaseDaoImpl;
import com.firewolf.oa.dao.PermissionDao;
import com.firewolf.oa.entities.Permission;

@Repository
@SuppressWarnings("unchecked")
public class PermissionDaoImpl extends BaseDaoImpl<Permission> implements PermissionDao {
	@Override
	public List<Permission> findTopPermission() {

		return getSession().createQuery("FROM Permission WHERE parent is null").list();
	}

}
